1. Field of the Invention
The present invention relates to a storage device having a plurality of ports to which time slots are allocated respectively to control access, and particularly to the storage device and a method of controlling access in the case where a necessary access period for securing a band varies depending on a kind of access.
2. Description of the Related Art
There is a data storing and reproducing system in which a plurality of external apparatuses store and reproduce data in a single storage device. A plurality of ports are provided to the storage device, and time slots (time frames for receiving access from the ports) are allocated to respective ports through which the apparatuses individually access to the storage device.
FIG. 1 is a diagram conceptually showing access to a storage device provided with a plurality of ports. Time slots are allocated to n ports (Port1 to Portn) provided in the storage device respectively. Buffer memories 21 (21(1) to 21(n)) are provided corresponding to the respective Port1 to Portn in the storage device.
In the case where data is stored from a Porti in the Port1 to Portn, the data input from the Porti is stored temporarily in a buffer memory 21(i), then, is read from the buffer memory 21(i) at a time slot allocated to the Porti, and is written into a storage medium 20 (for example, a flash memory in the case of a flash memory device that is a kind of semiconductor storage device) in the storage device.
Further, in the case where data is reproduced from a Portj, the data is read from the storage medium 20 at a time slot that is allocated to the Portj, and is stored temporarily in a buffer memory 21(j), then is read from the buffer memory 21(j), and is output to the Portj.
In the case of allocating the time slots to the plurality of ports of the storage device as described above, in order to secure a band for access to the storage device (in order to secure a specific traffic volume), it is necessary to access to the storage device for a certain period of time per unit time from the port where the band-secured access is carried out.
Here, in the case where a length of access time per unit time necessary for securing the band is uniform irrespective of the kind of access, the same number of time slots each having an equal length are allocated to ports where the band-secured access is carried out (see Japanese Unexamined Patent Application Publication No. H11-234625, paragraphs 0013 to 0019, FIGS. 1 and 5; and Japanese Unexamined Patent Application Publication No. H11-308558, paragraphs 0022 to 0025, FIGS. 1 and 2).
However, the length of access time per unit time necessary for securing the band may vary depending on the kind of access. For example, time necessary for reproducing a certain amount of data is longer than time necessary for storing the same amount of data in a flash memory device. Therefore, a long access time per unit time is necessary for securing the band for a port accessed for data reproduction, compared with a port accessed for data storage.
Further, in the case where data is reproduced, a larger amount of data should be reproduced per unit time at a transfer rate of 50 Mbps, compared with the reproduction at a transfer rate of 30 Mbps, for example. Therefore, access time per unit time necessary for securing the band at a port accessed for reproduction at a transfer rate of 50 Mbps is longer than that at a port accessed for reproduction at a transfer rate of 30 Mbps.
FIG. 2 shows a method of controlling access according to the related art regarding the above described case. Here, three kinds of access modes such as a Mode1, Mode2 and BestEffort are shown. Both the Mode1 and Mode2 are access modes the bands of which should be secured, but a necessary access time per unit time for securing the band of the Mode1 is longer than that of the Mode2. The BestEffort is an access mode the band of which is not secured, but a transfer rate thereof is made as high as possible (performance-based mode).
Further, there are provided ten ports (Port1 to Port10), and the Mode1 accesses the Port1, 2, 5, 10, and the Mode2 accesses the Port3, 4, 7, 8, and the BestEffort accesses the Port6, 9.
One time slot is allocated to each of the Port1, 2, 5, 10 for the Mode1 and to each of the Port3, 4, 7, 8 for the Mode2. A time slot length Taccess 1 for each of the ports for the Mode1 and a time slot length Taccess 2 for each of the ports for the Mode2 are set so that the following condition is satisfied.
Condition: an access period necessary for securing a band for the access of the Mode1, which is an amount of data in terms of a time length that buffer memories (buffer memories 21 in FIG. 1) corresponding to the ports for the Mode1 should store per access, is expressed as Tbuf 1 and an access period necessary for securing a band for the access of the Mode2 is similarly expressed as Tbuf 2, and the relationship between the Tbuf 1 and Tbuf 2 is represented by:
(Formula 1)Tbuf1≈Tbuf2  (1)
Further, time slots for the Port6, 9 for the BestEffort are located at the end, and a time slot length Taccess_best of the ports for the BestEffort is controlled so that a total of all the time slot lengths Ttotal_access satisfies the condition expressed by the following formula, thereby securing the band for the access of each of the Mode1 and Mode2.
(Formula 2)Tacccss1×Nmode1+Taccess2×Nmode2+Taccess_best=Ttotal_access≦Tbuf  (2)
where Tbuf is the shorter one of Tbuf 1 and Tbuf 2, and Nmode1 and Nmode2 are the number of ports accessed by the Mode1 and Mode2 respectively (here, Nmode1 is four, Nmode2 is four).